import { createApp } from "vue";

import "./style.less";

import App from "./App.vue";

import router from "../src/router/index.js";

import ElementPlus from 'element-plus'

import 'element-plus/dist/index.css'

import "./guard/index";

import bus from "./utils/bus/index.js";

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import { createPinia } from 'pinia'

import persistedstate from 'pinia-plugin-persistedstate'

// console.log(persistedstate,"kkkkk");



let app = createApp(App);

const pinia = createPinia()
pinia.use(persistedstate)//使用持久化存储


for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

app.config.globalProperties.bus = bus;

app.use(router); //使用路由

app.use(ElementPlus)//使用 ElementPlus


app.use(pinia);//使用pinia






app.mount("#app");
